<template>
  <div>
    <el-button @click="handleClick">点我弹出弹框 --- 警告</el-button>
    <el-button @click="handleClick2">点我弹出弹框 --- 提示</el-button>
  </div>
</template>

<script>
import {useDialog} from "@/components/dialog/MyDialog";

export default {
  name: "MyDialogTest",
  methods: {
    handleClick() {
      useDialog({title: "警告", message: "是否确定删除?", icon: "warn"}, (el) => {
        console.log("确定按钮点击");
      }, () => {
        console.log("取消按钮被点击");
      })
    },

    handleClick2() {
      useDialog({title: "提示", message: "是否确定添加?"}, () => {
        console.log("确定按钮点击");
      }, () => {
        console.log("取消按钮被点击");
      })
    }
  }
}
</script>

<style scoped>

</style>